import axios from "axios";

const API_URL = "http://localhost:8080/app/product"

export const getProductById=(id)=>{
    return axios.get(`${API_URL}/${id}`)
}

export const saveProduct=(product)=>{
    return axios.post(`${API_URL}/`,product)
}

export const updateProduct=(product)=>{
    return axios.put(`${API_URL}/`,product)
}

export const deleteProduct=(id)=>{
    return axios.delete(`${API_URL}/${id}`)
}